Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added currency field to course run search api #88

Closed
wants to merge 1 commit into from

Conversation

manan-memon
Copy link

This PR adds the currency code field for first_enrollable_paid_seat_price which is fetched from e-commerce for a paid verified course.

JIRA: https://edlyio.atlassian.net/browse/EDLY-6981


@property
def first_enrollable_paid_seat_price_currency(self):
# Sort in python to avoid an additional request to the database for order_by

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can replace # comment with docstrings.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced # with docstrings

# Sort in python to avoid an additional request to the database for order_by
seats = sorted(self._enrollable_paid_seats(), key=self._upgrade_deadline_sort)
if not seats:
# Enrollable paid seats are not available for this CourseRun.
Copy link

@Anas-hameed Anas-hameed Sep 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We can remove the inline comment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the inline comment

Copy link

@Anas-hameed Anas-hameed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@Anas-hameed Anas-hameed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manan-memon
Copy link
Author

Closing this PR as there is no need for this, required changes already merged in #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants